<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['供应链管理','品质管理','主机检验明细']" icon="fa fa-cogs"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>

	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>主机检验明细</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 220px);">
								<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time"
											id="datetimepicker1" autocomplete="off" placeholder="选择检验开始时间" />
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time"
											id="datetimepicker2" autocomplete="off" placeholder="选择检验结束时间" />
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>
								<div class="top_module top_module_box">
									<span class="module_text">设备ID</span>
									<input type="text" class="module_inp top_module_select"
										[(ngModel)]="tableSearch.deviceId" placeholder="设备ID" />
								</div>
								<div class="top_module top_module_box" style="min-width: auto;">
									<span class="top_module_label module_text">检验结果</span>
									<select name="" class="top_module_select" [(ngModel)]="tableSearch.resultStatus"
										style="min-width: 110px;">
										<option value="">全部</option>
										<option value="1">合格</option>
										<option value="2">不合格</option>
									</select>
								</div>
								<button class="btn btn-primary" (click)="table_search()">查询</button>
							</div>
						</div>
						<div class="table_scroll">
							<table
								class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>检验日期</th>
										<th>送检部门</th>
										<th>委外编号</th>
										<th>产品编号</th>
										<th>设备ID</th>
										<th>MES编号</th>
										<th>主机检验结果</th>
										<th>不良现象描述</th>
										<th>处理对策</th>
										<th>检验人员</th>
										<th>备注</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData; let i = index" [attr.data-index]="i">
										<td>{{row.checkDate.substring(0,10)}}</td>
										<td>{{row.checkDeptName}}</td>
										<td>{{row.consignorNumber}}</td>
										<td>{{row.productNumber}}</td>
										<td>{{row.deviceId}}</td>
										<td>{{row.mesNumber}}</td>
										<td>
											<span *ngIf="row.resultStatus == 1">合格</span>
											<span *ngIf="row.resultStatus == 2">不合格</span>
										</td>
										<td>{{row.badPhenoDesc}}</td>
										<td>{{row.countermeasures}}</td>
										<td>{{row.checker}}</td>
										<td>{{row.remark}}</td>
										<td>
											<!-- <button type="button" (click)="detailRow(row )">查看</button> -->
											<button type="button" (click)="deleteRow(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1"
								(onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i
									class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>